<!--
 * @FileDescription: 声音克隆页面中的表格组件
 -->
<script setup lang="ts">
import { useDefineDataSourceStore } from '@/stores/defineDataSourceList.ts';

defineOptions({
  inheritAttrs: false, // 允许用户透传属性到 TableBase
});

// pinia
const KnowledgeStore = useDefineDataSourceStore();
const refresh = async () => {
  await KnowledgeStore.KnowledgeList.reload();
};
</script>

<template>
  <KnowledgeTable
    :data="KnowledgeStore.KnowledgeList.data"
    :cols="['ScientificName', 'ChineseName', 'Area', 'Type', 'Time']"
    :error-msg="KnowledgeStore.KnowledgeList.err"
    :onRefresh="refresh"
    :retry-fn="refresh"
    empty-text="暂无入侵物种记录"
    remote-pagin
    v-bind="$attrs"
  />
</template>

<style scoped></style>
